package com.heima.admin.controller;

import com.heima.admin.service.UserAuthService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;

import com.heima.model.user.pojos.ApUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("/api/v1/auth")
public class UserAuthController {

    @Autowired
    private UserAuthService userAuthService;
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto dto){
        return userAuthService.list(dto);
    }

    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto dto){
        return userAuthService.authFail(dto);
    }

    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto dto){
        return userAuthService.authPass(dto);
    }
}
